//
//  SearchesController.h
//  SolarSeek
//
//  Created by Erick Fejta on 05/02/18.
//  Copyright 2005 Erick Fejta. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@class ServerConnection;
@class ShareController;
@class Search;
@class SolarSeekEngine;

@interface SearchesController : NSObject {
	NSMutableDictionary *_searchesDictionary;
	NSMutableDictionary *_searchesPending;
	ServerConnection *_serverConnection;
	ShareController *_shareController;
	SolarSeekEngine *_engine;
	NSMutableArray *_searchesArray;
	NSMutableSet *_tokensDead;
}

- (id)initWithEngine:(SolarSeekEngine *)engine;
- (void)browseUser:(NSString *)name;
- (Search *)searchUser:(NSString *)name forWords:(NSString *)words;
- (Search *)searchForWords:(NSString *)words;
- (void)endSearch:(Search *)search;

- (NSArray *)searches;

- (void)saveSearch:(Search *)search toFile:(NSString *)file;
- (Search *)loadSearchFromFile:(NSString *)file;
@end
